package com.wxzz.elearing.comment.service.openfeign;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wxzz.elearing.comment.dto.AdminQueAnsEnterpriseDto;
import com.wxzz.elearing.comment.service.openfeign.sentinel.EnterQueAnsApiFeignImpl;
import com.wxzz.elearning.common.dto.FeignWxUserDto;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "1122-wxzzlearn-user-model",fallback = EnterQueAnsApiFeignImpl.class)
public interface IEnterQueAnsApiFeign {


    /**
     * 查询企业行业列表
     * @return
     */
    @RequestMapping(value = "/enterprise-api/listEnterprise", method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE)
    ReturnVO<JgPageVo<List<JSONObject>>> selectEnterList(@RequestBody AdminQueAnsEnterpriseDto adminQueAnsEnterpriseDto);

    /**
     * 根据微信用户id换取用户信息
     * @param wxUserId
     * @return
     */
    @RequestMapping(value = "/wx-user-api/selectWxUserByWxUserId", method = RequestMethod.POST)
    ReturnVO<String> selectWxUserByWxUserId(@RequestParam("wxUserId") Long wxUserId);

    /**
     * 根据微信用户id换取用户信息
     * @param wxUserId
     * @return
     */
    @RequestMapping(value = "/wx-user-api/selectFeignWxUserDtoByWxUserId", method = RequestMethod.POST)
    FeignWxUserDto selectFeignWxUserDtoByWxUserId(@RequestParam("wxUserId") Long wxUserId);
}
